package io高级流or处理流;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class ISRDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fil = new FileInputStream("./src/高级流or处理流/uio.txt");
        InputStreamReader isr = new InputStreamReader(fil, StandardCharsets.UTF_8);
        /**
         * InputStreamReader 读入转换流*/

        int a;
        while ((a= isr.read())!=-1){//判断是否读到末尾
            System.out.print((char) a);
        }
        isr.close();

//        FileInputStream fil = new FileInputStream("./src/高级流or处理流/uio.txt");
//        InputStreamReader isr = new InputStreamReader(fil, StandardCharsets.UTF_8);
//        int a;
//        while ((a= isr.read())!=-1){
//            System.out.print((char) a);
//        }
//
//        isr.close();
    }
}
